Integrand size = 13, antiderivative size = 24 \[ \int \frac {\csc ^3(x)}{i+\tan (x)} \, dx=-\frac {1}{2} i \text {arctanh}(\cos (x))-\csc (x)+\frac {1}{2} i \cot (x) \csc (x) \]
[Out]
Time = 0.17 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.538, Rules used = {3599, 3187, 3186, 2686, 8, 2691, 3855} \[ \int \frac {\csc ^3(x)}{i+\tan (x)} \, dx=-\frac {1}{2} i \text {arctanh}(\cos (x))-\csc (x)+\frac {1}{2} i \cot (x) \csc (x) \]
[In]
[Out]
Rule 8
Rule 2686
Rule 2691
Rule 3186
Rule 3187
Rule 3599
Rule 3855
Rubi steps \begin{align*} \text {integral}& = \int \frac {\cot (x) \csc ^2(x)}{i \cos (x)+\sin (x)} \, dx \\ & = -\left (i \int \cot (x) \csc ^2(x) (\cos (x)+i \sin (x)) \, dx\right ) \\ & = -\left (i \int \left (i \cot (x) \csc (x)+\cot ^2(x) \csc (x)\right ) \, dx\right ) \\ & = -\left (i \int \cot ^2(x) \csc (x) \, dx\right )+\int \cot (x) \csc (x) \, dx \\ & = \frac {1}{2} i \cot (x) \csc (x)+\frac {1}{2} i \int \csc (x) \, dx-\text {Subst}(\int 1 \, dx,x,\csc (x)) \\ & = -\frac {1}{2} i \text {arctanh}(\cos (x))-\csc (x)+\frac {1}{2} i \cot (x) \csc (x) \\ \end{align*}
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(75\) vs. \(2(24)=48\).
Time = 0.04 (sec) , antiderivative size = 75, normalized size of antiderivative = 3.12 \[ \int \frac {\csc ^3(x)}{i+\tan (x)} \, dx=-\frac {1}{2} \cot \left (\frac {x}{2}\right )+\frac {1}{8} i \csc ^2\left (\frac {x}{2}\right )-\frac {1}{2} i \log \left (\cos \left (\frac {x}{2}\right )\right )+\frac {1}{2} i \log \left (\sin \left (\frac {x}{2}\right )\right )-\frac {1}{8} i \sec ^2\left (\frac {x}{2}\right )-\frac {1}{2} \tan \left (\frac {x}{2}\right ) \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 41 vs. \(2 (18 ) = 36\).
Time = 5.62 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.75
method | result | size |
default | \(-\frac {\tan \left (\frac {x}{2}\right )}{2}-\frac {i \left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{8}+\frac {i}{8 \tan \left (\frac {x}{2}\right )^{2}}+\frac {i \ln \left (\tan \left (\frac {x}{2}\right )\right )}{2}-\frac {1}{2 \tan \left (\frac {x}{2}\right )}\) | \(42\) |
risch | \(-\frac {i \left (3 \,{\mathrm e}^{3 i x}-{\mathrm e}^{i x}\right )}{\left ({\mathrm e}^{2 i x}-1\right )^{2}}-\frac {i \ln \left ({\mathrm e}^{i x}+1\right )}{2}+\frac {i \ln \left ({\mathrm e}^{i x}-1\right )}{2}\) | \(51\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 73 vs. \(2 (16) = 32\).
Time = 0.26 (sec) , antiderivative size = 73, normalized size of antiderivative = 3.04 \[ \int \frac {\csc ^3(x)}{i+\tan (x)} \, dx=\frac {{\left (-i \, e^{\left (4 i \, x\right )} + 2 i \, e^{\left (2 i \, x\right )} - i\right )} \log \left (e^{\left (i \, x\right )} + 1\right ) + {\left (i \, e^{\left (4 i \, x\right )} - 2 i \, e^{\left (2 i \, x\right )} + i\right )} \log \left (e^{\left (i \, x\right )} - 1\right ) - 6 i \, e^{\left (3 i \, x\right )} + 2 i \, e^{\left (i \, x\right )}}{2 \, {\left (e^{\left (4 i \, x\right )} - 2 \, e^{\left (2 i \, x\right )} + 1\right )}} \]
[In]
[Out]
\[ \int \frac {\csc ^3(x)}{i+\tan (x)} \, dx=\int \frac {\csc ^{3}{\left (x \right )}}{\tan {\left (x \right )} + i}\, dx \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 59 vs. \(2 (16) = 32\).
Time = 0.20 (sec) , antiderivative size = 59, normalized size of antiderivative = 2.46 \[ \int \frac {\csc ^3(x)}{i+\tan (x)} \, dx=-\frac {{\left (\frac {4 \, \sin \left (x\right )}{\cos \left (x\right ) + 1} - i\right )} {\left (\cos \left (x\right ) + 1\right )}^{2}}{8 \, \sin \left (x\right )^{2}} - \frac {\sin \left (x\right )}{2 \, {\left (\cos \left (x\right ) + 1\right )}} - \frac {i \, \sin \left (x\right )^{2}}{8 \, {\left (\cos \left (x\right ) + 1\right )}^{2}} + \frac {1}{2} i \, \log \left (\frac {\sin \left (x\right )}{\cos \left (x\right ) + 1}\right ) \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 46 vs. \(2 (16) = 32\).
Time = 0.33 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.92 \[ \int \frac {\csc ^3(x)}{i+\tan (x)} \, dx=-\frac {1}{8} i \, \tan \left (\frac {1}{2} \, x\right )^{2} - \frac {6 i \, \tan \left (\frac {1}{2} \, x\right )^{2} + 4 \, \tan \left (\frac {1}{2} \, x\right ) - i}{8 \, \tan \left (\frac {1}{2} \, x\right )^{2}} + \frac {1}{2} i \, \log \left (\tan \left (\frac {1}{2} \, x\right )\right ) - \frac {1}{2} \, \tan \left (\frac {1}{2} \, x\right ) \]
[In]
[Out]
Time = 4.74 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.71 \[ \int \frac {\csc ^3(x)}{i+\tan (x)} \, dx=-\frac {\mathrm {tan}\left (\frac {x}{2}\right )}{2}+\frac {\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )\,1{}\mathrm {i}}{2}-\frac {2\,\mathrm {tan}\left (\frac {x}{2}\right )-\frac {1}{2}{}\mathrm {i}}{4\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}-\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^2\,1{}\mathrm {i}}{8} \]
[In]
[Out]